Skip to content

[dongzoolee] WEEK 1 Solutions#2376

Open
dongzoolee wants to merge 4 commits intoDaleStudy:mainfrom
dongzoolee:main
Open

[dongzoolee] WEEK 1 Solutions#2376
dongzoolee wants to merge 4 commits intoDaleStudy:mainfrom
dongzoolee:main

Conversation

@dongzoolee
Copy link

@dongzoolee dongzoolee commented Mar 5, 2026

답안 제출 문제

작성자 체크 리스트

  • Projects의 오른쪽 버튼(▼)을 눌러 확장한 뒤, Week를 현재 주차로 설정해주세요.
  • 문제를 모두 푸시면 프로젝트에서 StatusIn Review로 설정해주세요.
  • 코드 검토자 1분 이상으로부터 승인을 받으셨다면 PR을 병합해주세요.

검토자 체크 리스트

Important

본인 답안 제출 뿐만 아니라 다른 분 PR 하나 이상을 반드시 검토를 해주셔야 합니다!

  • 바로 이전에 올라온 PR에 본인을 코드 리뷰어로 추가해주세요.
  • 본인이 검토해야하는 PR의 답안 코드에 피드백을 주세요.
  • 토요일 전까지 PR을 병합할 수 있도록 승인해주세요.

@nowrobin nowrobin self-requested a review March 7, 2026 10:58
Copy link
Contributor

@nowrobin nowrobin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

문제풀이 고생하셨습니다. 비슷한 풀이인 문제들도 있었지만 다른 방식으로 푼것 보고 새롭게 느껴졌네요. 코멘트 남기부분은 가독성과 의도파악부분이라 참고만 해주시면 감사하겠습니다. 다음주도 화이팅입니다.

Comment on lines +6 to +12
unq_nums.sort((a, b) => {
if (mp[a] === mp[b]) {
return 0;
}

return mp[a] < mp[b] ? 1 : -1;
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기 부분을 unq_nums.sort((a, b) => mp[b] - mp[a]);
이런시으로 단순화 할수있을것 같습니다.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

l,r 같이 포인터를 이용해서 조합을 순회하는 방식으로 구현하신 것 같은데, 이런 구조를 선택하신 이유가 있을까요?
모든 쌍을 확인하는 문제라서 이중 for문이 의도를 파악하기에는 더 쉬울 것 같다는 생각이 들었습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Solving

Development

Successfully merging this pull request may close these issues.

2 participants